<template>
  <div class="response">
    <header>
      <div class="lis">
        <dl>
          <dt>
            <li>
              <img
                :src="obj.userImg" alt=""
              />
              <p><span>{{obj.name}}</span> <span>{{obj.time}}</span></p>
            </li>
            <p>{{obj.title}}</p>
          </dt>
          <dd>
            <p>
              <span>意向区域：{{obj.area}}</span><span>意向价格：<b>{{obj.price}}/月</b></span>
            </p>
          </dd>
        </dl>
      </div>
      <textarea type="text" v-model="keyboards"></textarea>
    </header>
    <footer>
      <Keyboard v-on:updatekey="GetKeyVal"></Keyboard>
    </footer>
  </div>
</template>

<script>
import Keyboard from '../components/Keyboard.vue'
export default {
  data () {
    return {
      obj: {}, /// 详情数据
      keyboards: ''
    }
  },
  components: {
    Keyboard
  },
  methods: {
    GetKeyVal (val) {
      this.keyboards = val
      console.log(val)
    }
  },
  created () {
    this.obj = JSON.parse(window.sessionStorage.getItem('obj'))
    console.log(this.obj)
  }
}
</script>

<style scoped lang='scss'>
.response{
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #f2f2f2;
  header{
    height: 420px;
  }
}
footer{
  width: 100%;
  height: 240px;
  position: absolute;
  bottom: 0;
  left: 0;
}
textarea {
  display: block;
  width: 100%;
  min-height: 100px;
  padding: 0;
  margin: 20px 0;
  font-size: 16px;
}
.space{
  width: 50px;
  display: inline-block;
}
.lis {
  width: 100%;
  height: 120px;
  dl {
    width: 100%;
    height: 120px;
    border-bottom: 1px solid #eee;
    padding: 0 5px;
    background-color: #fff;
    margin-bottom: 15px;
    dt {
      width: 100%;
      height: 80px;
      border-bottom: 1px solid #eee;
      img {
        width: 35px;
        height: 35px;
        margin: 0 10px;
        border-radius: 50%;
      }
      li {
        height: 45px;
        display: flex;
        align-items: center;
        p {
          flex: 1;
          display: flex;
          justify-content: space-between;
          padding: 0 5px;
        }
      }
      p {
        height: 35px;
        line-height: 35px;
      }
    }
    dd {
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      p {
        font-size: 15px;
        span {
          margin: 0 5px;
          b {
            color: #f00;
            font-size: 13px;
          }
        }
      }
    }
  }
}
</style>
